       IDENTIFICATION DIVISION.
       PROGRAM-ID. MostrarArchivoAsignaciones.
       AUTHOR. Grupo 5. 2do cuatrimestre 2011.

       ENVIRONMENT DIVISION.
         INPUT-OUTPUT SECTION.
           FILE-CONTROL.
             SELECT ASIG-ARCH ASSIGN TO "ASIGNACIONES.IDX"
                 ORGANIZATION IS INDEXED
                 ACCESS MODE IS SEQUENTIAL
                 RECORD KEY IS ASIG-CLAVE
                 FILE STATUS IS ASIG-STATUS.

       DATA DIVISION.
         FILE SECTION.
           COPY "Asignaciones-FD.cbl".

         WORKING-STORAGE SECTION.
           01 ASIG-STATUS               PIC X(02).

       PROCEDURE DIVISION.
         OPEN INPUT ASIG-ARCH

         MOVE SPACES TO ASIG-CLAVE
         START ASIG-ARCH KEY IS GREATER THAN ASIG-CLAVE
         
         READ ASIG-ARCH NEXT RECORD
             AT END SET ASIG-EOF TO TRUE
         END-READ.
         
         PERFORM UNTIL ASIG-EOF
             DISPLAY ASIG-REG

             READ ASIG-ARCH NEXT RECORD
                 AT END SET ASIG-EOF TO TRUE
             END-READ
         END-PERFORM
          
         CLOSE ASIG-ARCH

         STOP RUN
         .
